

<script lang="ts" setup>
import { ref } from "vue"
import { useRoute } from 'vue-router';
let route = useRoute();
var ulname = ref();
var uid = ref();
let tlogin = true;
let flogin = false;
//alert('a');
if (route.params.uid != null) {
    alert('b');
    alert(route.params.uid);
    alert(route.params.uname);
    uid.value = route.params.uid.toString();
    ulname.value = route.params.uname.toString();
alert(ulname.value);

}
else {
    ulname.value="";
    tlogin = false;
    flogin = true;
}

alert(ulname.value);


//const msg = ref("2110B");

const uname = ref("");


const getNum = (value: any) => {
  console.log(value);//value为传过来的参数
  uname.value = value;
}

</script>



<template>
    <div v-show="tlogin">
        欢迎您，管理员 <a href="#">{{ ulname.value }} </a>。您选择【首页】【退出】
    </div>
    <div v-show="flogin">
        请登录
    </div>
</template>